package com.example.broadcast;

import com.example.MyApplication;
import com.example.androidtest.BroadCastTestActivity;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class CustomerRecevier extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {

		Activity cur = MyApplication.currentActivity();
		if (cur instanceof BroadCastTestActivity) {
			String data = intent.getStringExtra("data");
			((BroadCastTestActivity) cur).textView.append(data + "\n");
			Log.i("JINISU", data);
		} else {
			Log.i("JINISU", "-");
		}

	}

}
